<?php

class Logger {
    static function error($msg){
        Buffer::Add('LOGGER_ERROR', "<div class='message error'>".$msg."</div>");
    }
    
    static function GetErrors(){
        return Buffer::Get('LOGGER_ERROR');
    }
    
    static function message($msg){
        Buffer::Add('LOGGER_MESSAGE', "<div class='message notice'>".$msg."</div>");
    }
    
    static function GetMessages(){
        return Buffer::Get('LOGGER_MESSAGE');
    }
    
    static function warning($msg){
        Buffer::Add('LOGGER_WARNING', "<div class='message warning'>".$msg."</div>");
    }
    
    static function GetWarning(){
        return Buffer::Get('LOGGER_WARNING');
    }
    
    static function ok($msg){
        Buffer::Add('LOGGER_OK', "<div class='message ok'>".$msg."</div>");
    }
    
    static function GetOk(){
        return Buffer::Get('LOGGER_OK');
    }
    
    static function ShowAll(){
        print self::GetErrors();
        print self::GetWarning();
        print self::GetMessages();
        print self::GetOk();
    }
}
